﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XWord.Fundamental.Domain;

namespace XWord.GUI
{
    public class EtymaUtil
    {
        public static IList<EtymaMessage> ParseText(string text)
        {
            var etymas = text.Split(new char[] { ',' });
            IList<EtymaMessage> messageList = new List<EtymaMessage>();
            for (int i = 0; i < etymas.Length; i++)
            {
                var message = new EtymaMessage();
                message.ParseEtyma(etymas[i].Trim());
                if (!string.IsNullOrEmpty(message.Name))
                {
                    messageList.Add(message);
                }
            }
            return messageList;
        }
    }
}
